window.onload=function(){
	//获取客户来源
	var custSources = $("#custSources").val().replace("[","").replace("]","").replace(" ","").split(",");
	for(var i=0;i<custSources.length;i++){
		var option = $("<option value='"+custSources[i]+"'>"+custSources[i]+"</option>");
		$("#custSource").append(option);
	}
	//获取客户行业
	var custIndustrys = $("#custIndustrys").val().replace("[","").replace("]","").replace(" ","").split(",");
	for(var i=0;i<custIndustrys.length;i++){
		var option = $("<option value='"+custIndustrys[i]+"'>"+custIndustrys[i]+"</option>");
		$("#custIndustry").append(option);
	}
	//获取客户级别
	var custLevels = $("#custLevels").val().replace("[","").replace("]","").replace(" ","").split(",");
	for(var i=0;i<custLevels.length;i++){
		var option = $("<option value='"+custLevels[i]+"'>"+custLevels[i]+"</option>");
		$("#custLevel").append(option);
	}
	
	var custSource = $("#cust_source").val();
	$("#custSource").val(custSource);
	$("#custIndustry").val($("#cust_industry").val());
	$("#custLevel").val($("#cust_level").val());
}
